home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / util / libs / ttrender.lha / ttrender-3.1 / Examples / OpenFontTest / startup.c < prev    next >
C/C++ Source or Header  |  2002-05-27  |  801b  |  40 lines

  1. /*
  2. ** $Id: startup.c 1.11 1999/05/09 19:36:21 Krashan Exp Krashan $
  3. */
  4.  
  5. #define __NOLIBBASE__
  6.  
  7. #include <proto/dos.h>
  8. #include <proto/exec.h>
  9.  
  10. struct Library *SysBase, *DOSBase;
  11.  
  12. __saveds long _main (void)
  13.  {
  14.   long ret_value, wb;
  15.   struct Process *process;
  16.   struct Message *wbmessage = NULL;
  17.   
  18.   SysBase = *(struct Library**)4;
  19.   if (DOSBase = (struct Library*)OpenLibrary ("dos.library", 37))
  20.    {
  21.     process = (struct Process*)FindTask (NULL);
  22.     if (process->pr_CLI) wb = FALSE;
  23.     else
  24.      {
  25.         WaitPort (&process->pr_MsgPort);
  26.         wbmessage = GetMsg (&process->pr_MsgPort);
  27.         wb = TRUE;
  28.      }
  29.     ret_value = Main (wb);
  30.     CloseLibrary (DOSBase);
  31.     if (wbmessage)
  32.      {
  33.       Forbid ();
  34.       ReplyMsg (wbmessage);
  35.      }
  36.     return (ret_value);
  37.    }
  38.   return (10);
  39.  }
  40.